{% load url from future %}
{% if list_title %}
  <h3>{{ list_title }} <span class='badge badge-info'>{{ license_list|length }}</span></h3>
{% endif %}
{% if license_list|length %}
  <p/>
  <table cellpadding="0" cellspacing="0" border="0" class='licenselist table table-striped table-condensed'>
      <thead>
          <tr>
            <th>Item           </th>
            <th>Licensed Seats </th>
            <th>Installed Seats</th>
            <th>Available Seats</th>
          </tr>
          </tr>
      </thead>
      <tbody>
      {% for license in license_list %}
          <tr>
              <td{% if license.available < 0 %} class='error'{% endif %}>{{ license.item_name }}</td>
              <td>{{ license.total }}</td>
              <td><a href={% url "inventory.views.items" %}{{ license.inventory_query_string }}>{{ license.used }}</a></td>
              <td{% if license.available < 0 %} class='text-error'{% endif %}>{{ license.available }}</td>
          </tr>
      {% endfor %}
      </tbody>
  </table>
{% endif %}
